package com.forekenow.Demo4.exercise30726;

public class Test {
    public static void main(String[] args) {
        Test test = new Test();
        Animal animal = new Cat("加菲猫",4);
        System.out.print(animal.getName()+animal.getLegNum());
        animal.shout();
        animal = new Duck("唐小鸭",2);
        System.out.print(animal.getName()+animal.getLegNum());
        animal.shout();
    }
}
